/*
 * @Descripttion: 
 * @version: 
 * @Author: DavidLee
 * @Date: 2023-08-29 20:27:11
 * @LastEditors: DavidLee
 * @LastEditTime: 2024-04-13 12:52:31
 */
const CompressionPlugin = require('compression-webpack-plugin')
// 控制前端端口
module.exports = {
  devServer: {
    port: 80,
    https: false,
    open: false
  },
  // configureWebpack:{
  //     resolve:{
  //       alias:{
  //         '@':Path2D.resolve((__dirname,'src'))
  //       }
  //     }
  // },
  lintOnSave: false,
  productionSourceMap: false,
  configureWebpack: {
    plugins: [
      new CompressionPlugin({
        algorithm: 'gzip',
        test: /\.js$|\.html$|\.css$/,
        filename: '[path].gz[query]',
        minRatio: 1,
        threshold: 10240,
        deleteOriginalAssets: false
      })
    ]
  }
}
